<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <link rel="stylesheet" type="text/css" href="https://wx-static.drip.im/css/base.css?t=1505204250563"/>
    <link rel="stylesheet" type="text/css" href="https://wx-static.drip.im/css/shop/dpl.css?t=1505204250563"/>
    <link rel="stylesheet" type="text/css" href="https://wx-static.drip.im/css/shop/form/preview.css?t=1505204250563"/>
    <link rel="stylesheet" type="text/css" href="https://wx-static.drip.im/css/shop/form/activity.css?t=1505204250563"/>
    <link rel="stylesheet" type="text/css"
          href="https://wx-static.drip.im/css/fonts/form/iconfont.css?t=1505204250563"/>
    <meta http-equiv="Content-Security-Policy"
          content="script-src 'self' 'nonce-99b4ecf93d7b2b23' 'unsafe-inline' 'unsafe-eval' https: *.qq.com api.map.baidu.com wx-static.drip.im eco-api.meiqia.com wxs-b.drip.im hm.baidu.com;object-src *.qq.com *.youku.com;frame-src *.qq.com *.youku.com weixinping: weixin:">
    <!--<script src='js/lrz.all.bundle.js?t=1505204250563'></script>-->
    <!--<script src="js/sea.js?t=1505204250563"></script>-->
    <!--<script src="https://wx-static.drip.im/js/dist/shop/form/validate.js?92324,860188516"></script>-->
    <script src="https://wx-static.drip.im/js/core/jquery-2.1.1.min.js?18934"></script>
    <title>课程报名</title>
</head>
<script nonce="99b4ecf93d7b2b23">
    var _hook = {
        domain: '285946',
        statId: 'ea7d7ff2-5f4f-4fa1-b904-a42916874ce5',
        resource: 'https://qiniu.drip.im',
        statType: 4
    };
</script>
<body>
<!—[if lte IE 10]>
<script nonce="99b4ecf93d7b2b23">document.createElement('header');</script>
<![endif]—>
<div class="screen">
    <div class='ui-form style_9' id="form">
        <div class="ui-title"> 文思学堂 - 数据录入平台</div>
        <div class="ui-content form-fields" data-form-id="ea7d7ff2-5f4f-4fa1-b904-a42916874ce5"
             data-openid="notWxSubmit"
             data-success-tip='{&quot;notifyType&quot;:&quot;text&quot;,&quot;showSeq&quot;:false,&quot;text&quot;:&quot;恭喜，提交成功！&quot;}'>
            <div class="form-desc">
                <p>根据每个孩子的情况，有针对性的辅导，并填写作业相关的数据。</p>
            </div>
            <!--<form action="api.php" method="post">-->
            <label>
                <input id="sex" type="hidden" name="sex" value="0">
                <input id="exec" type="hidden" name="exec" value="0">
            </label>
            <div class="ui-field  " id="field_105" data-field-id="105" data-field-type="textInput"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="姓名">
                <label class="field-label"> 姓名 <span class="required">*</span>
                    <span id="name_err" class="tips"></span>
                </label>
                <div class="field-content">
                    <input id="name" type="text" class="ui-input" placeholder="姓名" name="name"/>
                </div>
            </div>
            <div class="ui-field " id="field_111" data-field-id="111" data-field-type="radio"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="性别">
                <label class="field-label"> 性别 <span class="required">*</span>
                    <span class="tips"></span>
                </label>
                <div class="field-content ui-list select-list">
                    <div class="list-item">
                        <div id="nan" class='radio-outside'>
                            <div class='radio-inside'></div>
                        </div>
                        <span class='option-label'>男孩</span>
                    </div>
                    <div class="list-item">
                        <label>
                            <input class="ui-radio" type="radio" name="111" value="2" data-label="女孩">
                        </label>
                        <div id="nv" class='radio-outside'>
                            <div class='radio-inside'></div>
                        </div>
                        <span class='option-label'>女孩</span>
                    </div>
                </div>
            </div>
            <div class="ui-field  " id="field_133" data-field-id="133" data-field-type="select"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="就读学校">
                <label class="field-label"> 就读学校 <span class="required">*</span>
                    <span class="tips"></span>
                </label>
                <div class="field-content">
                    <select class="ui-select" name="school" id="school">
                        <option>请选择</option>
                        <option value="1">雍雅锦江小学</option>
                        <option value="2">北豆小学</option>
                        <option value="11">南豆小学</option>
                        <option value="3">中仰陵小学</option>
                        <option value="4">东仰陵小学</option>
                        <option value="5">宋营小学</option>
                        <option value="9">想象国际小学</option>
                        <option value="12">高新区第一小学</option>
                        <option value="10">高新区第二小学</option>
                        <option value="6">精英小学</option>
                        <option value="7">54中学</option>
                        <option value="8">师大附中</option>
                        <option value="13">南辛庄小学</option>
                    </select>
                </div>
            </div>
            <div class="ui-field  " id="field_129" data-field-id="129" data-field-type="select"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="所在年级">
                <label class="field-label"> 所在年级 <span class="required">*</span>
                    <span class="tips"></span>
                </label>
                <div class="field-content">
                    <select class="ui-select" name="grade" id="grade">
                        <option>请选择</option>
                        <option value="1">一年级</option>
                        <option value="2">二年级</option>
                        <option value="3">三年级</option>
                        <option value="4">四年级</option>
                        <option value="8">五年级</option>
                        <option value="7">六年级</option>
                        <option value="6">初一</option>
                        <option value="5">初二</option>
                        <option value="9">初三</option>
                    </select>
                </div>
            </div>
            <div class="ui-field  " id="field_137" data-field-id="137" data-field-type="select"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="所在班级">
                <label class="field-label"> 所在班级 <span class="required">*</span>
                    <span class="tips"></span>
                </label>
                <div class="field-content">
                    <select class="ui-select" name="class" id="class">
                        <option>请选择</option>
                        <option value="1">1班</option>
                        <option value="2">2班</option>
                        <option value="10">3班</option>
                        <option value="9">4班</option>
                        <option value="8">5班</option>
                        <option value="7">6班</option>
                        <option value="6">7班</option>
                        <option value="5">8班</option>
                        <option value="4">9班</option>
                        <option value="3">10班</option>
                        <option value="15">11班</option>
                        <option value="14">12班</option>
                        <option value="13">13班</option>
                        <option value="12">14班</option>
                        <option value="11">15班</option>
                    </select>
                </div>
            </div>
            <div class="ui-field  " id="field_134" data-field-id="134" data-field-type="select"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="所在小区">
                <label class="field-label"> 所在小区 <span class="required">*</span>
                    <span class="tips"></span>
                </label>
                <div class="field-content">
                    <select class="ui-select" name="pos" id="pos">
                        <option>请选择</option>
                        <option value="1">岗当新村</option>
                        <option value="2">东海盛景</option>
                        <option value="3">天地荣域</option>
                        <option value="7">雍雅锦江</option>
                        <option value="17">石门福地</option>
                        <option value="4">天然城</option>
                        <option value="5">红石原著</option>
                        <option value="6">天山水榭花都</option>
                        <option value="8">金色家园</option>
                        <option value="9">加洲阳光</option>
                        <option value="10">和合美家</option>
                        <option value="11">东方城</option>
                        <option value="12">天山花园</option>
                        <option value="13">想象国际</option>
                        <option value="14">小岗上新村</option>
                        <option value="15">北豆村</option>
                        <option value="16">南豆村</option>
                    </select>
                </div>
            </div>
            <div class="ui-field  center" id="field_112" data-field-id="112" data-field-type="splitLine"
                 data-validate='{&quot;required&quot;:false}' data-rule='[]' data-field-label="更多内容，建议填写">
                <div class="field-content">
                    <div class="split-line">
                        <span>更多内容，建议填写</span>
                    </div>
                </div>
            </div>
            <div class="ui-field  " id="field_124" data-field-id="124" data-field-type="textArea"
                 data-validate='{&quot;required&quot;:false}' data-rule='[]' data-field-label="最近一次考试成绩">
                <label class="field-label">
                    最近一次考试成绩
                    <span class="tips"></span>
                </label>
                <div class="field-content">
                        <textarea id="late_mark" name="late_mark" class="ui-textarea"
                                  placeholder="期中、期末考试成功，模拟考试成绩，填写越多，更好针对孩子进行辅导"></textarea>
                </div>
            </div>
            <div class="ui-field  " id="field_139" data-field-id="139" data-field-type="textArea"
                 data-validate='{&quot;required&quot;:true}' data-rule='[]' data-field-label="小朋友在家写作业多久?">
                <label class="field-label"> 日常作业表现 <span class="required">*</span>
                    <span class="tips"></span>
                </label>
                <div class="field-content ui-list select-list">
                    <div class="list-item">
                        <input class="ui-checkbox" type="checkbox" name="121" value="1" data-label="磨磨蹭蹭">
                        <div id="checkbox_1" class="checkbox-outside">
                            <div class="checkbox-inside"></div>
                        </div>
                        <span class="option-label">磨磨蹭蹭</span>
                    </div>
                    <div class="list-item">
                        <input class="ui-checkbox" type="checkbox" name="121" value="2" data-label="很快写完">
                        <div id="checkbox_2" class="checkbox-outside">
                            <div class="checkbox-inside"></div>
                        </div>
                        <span class="option-label">很快写完</span>
                    </div>
                    <div class="list-item">
                        <input class="ui-checkbox" type="checkbox" name="121" value="3" data-label="错题很多">
                        <div id="checkbox_3" class="checkbox-outside">
                            <div class="checkbox-inside"></div>
                        </div>
                        <span class="option-label">错题很多</span>
                    </div>
                </div>
            </div>
            <button class="ui-button green" id="submit">提交</button>
            <footer class="drip-footer">
                <p> © <a href="#" style="font-family: 隶书; font-size: 18px;">文思学堂</a> 最终解析权 </p>
            </footer>
            <!--</form>-->
        </div>
        <div class='hidden' data-userinfo='' id='userinfo'>
            <div class="ui-title"> 课程报名</div>
            <div class="tips-box">
                <img src="https://wx-static.drip.im/img/shop/single/form/success.png?t=1505204250563" width='48px'
                     height='48px'/>
                <p class="tips">恭喜，提交成功！</p>
                <div>
                    <a href="http://weixin.drip.im/form/statistics/ea7d7ff2-5f4f-4fa1-b904-a42916874ce5?special=285946"
                       class="showData">
                        <img src="https://wx-static.drip.im/img/shop/single/form/show-data.png?t=1505204250563"/>
                        查看统计
                    </a>
                </div>
                <div>
                    <a href="http://weixin.drip.im/form/detail/ea7d7ff2-5f4f-4fa1-b904-a42916874ce5?special=285946"
                       class="formBack showData">
                        <img src="https://wx-static.drip.im/img/shop/single/form/form-back.png?t=1505204250563" alt="">
                        返回表单
                    </a>
                </div>
            </div>
        </div>
        <script id="fileBoxTpl" type="text/template">
            <li class="file-box">
                <div class="file-img">
                    <img src="https://wx-static.drip.im/img/shop/single/form/file-default.png?t=1505204250563">
                </div>
                <div class="progress">
    <span class="bar">
      <i></i>
    </span>
                    <p>
                        <span></span>
                        <a class="file-cancel">取消</a>
                    </p>
                </div>
                <div class="file-detail hidden">
                    <p class="name">{{name}}</p>
                    <p class="size">{{size}}</p>
                    <p class="url hidden">{{url}}</p>
                    <p class="control">
                        <span class="file-delete">删除</span>
                        |
                        <span class="reupload upload-file-trigger">重新选择</span>
                    </p>
                </div>
            </li>
        </script>
        <script id="goods-item-tpl" type="text/template">
            <dl>
                <dt>${item.name}</dt>
                <dd class="price">￥${item.price|realPrice}</dd>
                <dd class="stock">库存：${item.stock}</dd>
            </dl>
            <div class="control">
                {@if number > 0}
                <em class="delete"><i>－</i></em><span>${number}</span><em class="add"><i>＋</i></em>
                {@else}
                <em class="add"><i>＋</i></em>
                {@/if}
            </div>
        </script>
        <script id="dui-alert-tpl" type="text/template">
            <div class="dui-dialog-box">
                <div class="dui-mask"></div>
                <div class="dui-dialog">
                    <div class="dialog-hd">提示</div>
                    <div class="dialog-bd">${body}</div>
                    <div class="dialog-ft">
                        {@if redirect}
                        <a href="${redirect.url}">${redirect.title}</a>
                        {@else}
                        <a>确定</a>
                        {@/if}
                    </div>
                </div>
            </div>
        </script>
        <script id="goods-items-tpl" type="text/template">
            {@each items as item,idx}
            <div class="list-item goods-item" id="goods-item-${item.id}" data-item-id="${item.id}"
                 data-item-idx="${idx}">
                <dl>
                    <dt>${item.name}</dt>
                    <dd class="price">￥${item.price|realPrice}</dd>
                    {@if config.showStock}
                    <dd class="stock">库存：${item.stock}</dd>
                    {@/if}
                </dl>
                <div class="control">
                    <em class="delete hidden"><i>－</i></em><span></span><em class="add"><i>＋</i></em>
                </div>
            </div>
            {@/each}
            <div class="list-item goods-amount">
                总计：<span class="amount">￥0.00</span>
            </div>
        </script>
        <div class="submit-loading hidden">
            <div class="wrap">
                <div class="circle"></div>
                <p>提交中</p></div>
        </div>
    </div>
</div>
<div class="qrcode">
    <div class="img-side">
        <img src="http://weixin.drip.im/form/qr_code?formId=ea7d7ff2-5f4f-4fa1-b904-a42916874ce5&special=285946">
    </div>
    <p>微信扫一扫</p>
    <p>在手机上填写</p>
</div>
</body>
<script nonce="99b4ecf93d7b2b23">
    //        seajs.use("wap.js?t=1505204250563", function (app) {
    //        seajs.use("https://wx-static.drip.im/js/wap.js?t=1505204250563", function (app) {
    //            app.init('shop/ui,shop/form/validate,shop/form/file-upload,stat');
    //        });
    $("#nv").click(function () {
        $("#nv").attr("class", "radio-outside radio-checked");
        $("#nan").attr("class", "radio-outside");
        $("#sex").attr("value", "2");
    });
    $("#nan").click(function () {
        $("#nan").attr("class", "radio-outside radio-checked");
        $("#nv").attr("class", "radio-outside");
        $("#sex").attr("value", "1");
    });
    $("#checkbox_1").click(function () {
        const cls = $("#checkbox_1").attr("class");
        const vlue = $("#exec").attr("value");
        if (cls == "checkbox-outside checkbox-checked") {
            $("#checkbox_1").attr("class", "checkbox-outside");
            $("#exec").attr("value", Number(vlue) - 1);
        } else {
            $("#checkbox_1").attr("class", "checkbox-outside checkbox-checked");
            $("#exec").attr("value", Number(vlue) + 1);
        }
    });
    $("#checkbox_2").click(function () {
        const cls = $("#checkbox_2").attr("class");
        const vlue = $("#exec").attr("value");
        if (cls == "checkbox-outside checkbox-checked") {
            $("#checkbox_2").attr("class", "checkbox-outside");
            $("#exec").attr("value", Number(vlue) - 2);
        } else {
            $("#checkbox_2").attr("class", "checkbox-outside checkbox-checked");
            $("#exec").attr("value", Number(vlue) + 2);
        }
    });
    $("#checkbox_3").click(function () {
        const cls = $("#checkbox_3").attr("class");
        const vlue = $("#exec").attr("value");
        if (cls == "checkbox-outside checkbox-checked") {
            $("#checkbox_3").attr("class", "checkbox-outside");
            $("#exec").attr("value", Number(vlue) - 3);
        } else {
            $("#checkbox_3").attr("class", "checkbox-outside checkbox-checked");
            $("#exec").attr("value", Number(vlue) + 3);
        }
    });
    $("button").click(function () {
        const name = $("#name").val();
        const sex = $("#sex").val();
        const exec = $("#exec").val();
        const school = $("#school").val();
        const grade = $("#grade").val();
        const clss = $("#class").val();
        const pos = $("#pos").val();
        const late_mark = $("#late_mark").val();

        if (name == "") {
            $("#name").focus();
            $("#name_err").html("请填写");
            return;
        }
        const data = {
            'name': name,
            'sex': sex,
            'exec': exec,
            'school': school,
            'grade': grade,
            'class': clss,
            'pos': pos,
            'late_mark': late_mark
        };
        console.log(data);
        $.post('api.php?action=add', data, function (data, status) {
            console.log(strToJson(data));
        });
        $("#userinfo").attr("class", "");
        $("#form").attr("class", "hidden");
    });

    function strToJson(str) {
        const j = eval('(' + str + ')');
        return j;
    }
</script>
<script nonce="99b4ecf93d7b2b23">
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "//hm.baidu.com/hm.js?5438c2334f2a1423dc50b05a2bf2faf0";
        hm.setAttribute('nonce', '99b4ecf93d7b2b23');
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</html>
